﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using com.paypal.soap.api;
using ASPDotNetSamples;
using System.Text; 

public partial class Admin_TransactionSearchResults : System.Web.UI.Page    
{
    private void Page_Load(object sender, EventArgs e)
    {
    }

    protected TransactionSearchResponseType PayPalResponse
    {
        get
        {
            return (TransactionSearchResponseType)this.Session[Constants.TRANSACTION_SEARCH_SESSION_KEY];
        }
    }
    protected void TransactionID_Click(object sender, EventArgs e)
    {
  
    }
    protected int ResultsCountLiteralText
    {
        get
        {
            return HasTransactions ? PayPalResponse.PaymentTransactions.Length : 0;
        }
    }

    protected bool NoMatchPlaceHolderVisible
    {
        get
        {
            return !this.ResultsHeaderPlaceHolderVisible;
        }
    }

    protected bool ResultsHeaderPlaceHolderVisible
    {
        get
        {
            return HasTransactions && PayPalResponse.PaymentTransactions.Length > 0;
        }
    }

    private bool HasTransactions
    {
        get { return PayPalResponse.PaymentTransactions != null; }
    }

    protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);
        this.DataBind();
    }

    public override void DataBind()
    {
        if (this.PayPalResponse != null)
        {
            base.DataBind();
        }
    }
}